public with sharing class Cald_OpportunityExtensionVF {
    
    private final Opportunity[] opportunity = new Opportunity[1];
    private ID oppId = null;
    
    private ID planId = null;
    private Double planQuota = 0;
    private Double planOTE = 0;
    private String payoutType = '';
    
    public List<Opportunity> opportunityList {get; set;}
    public Callidus_Rate__c[] currentRateList {get; set;}     
    public String claimedCredit {get; set;}   
    public String ytdAttainment {get; set;}    
    public String commissionRate {get; set;}    
    public String commissionAmount {get; set;} 
    public Boolean claimedAmountFlag {get; set;}
    public Boolean fileClaimButtonFlag {get; set;}
    public Boolean estimateButtonFlag {get; set;}
    public Boolean ytdAttainmentFlag {get; set;}
    public Boolean lookUpButFlag {get; set;}
    public Boolean pendingApprovalFlag {get; set;}
    public Boolean nonPendingApprovalFlag {get; set;}
    public Boolean withdrawButFlag {get; set;}
    public Boolean displayAssignedToFlag {get; set;}
    public Boolean showClaimHistories {get; set;}
    public Boolean displayDraftFlag {get; set;}
    public Boolean displayReadOnlyFlag {get; set;}
    public Boolean renderNotesAndAttach {get; set;}
    public Boolean standaloneFlag {get; set;}
    public Boolean planAssociatedFlag {get; set;}
    public Callidus_Claim__c filingDateClaim {get; set;} 
    public Callidus_Claim_Status_Credit__c[] existingCSCList {get; set;} 
    public Opportunity[] participantOppList {get; set;}

    private Double sumOfOpenOpp = 0;
    private Double sumOfClosedOpp = 0;
    private Double sumOfPendingClaims = 0;
    private Double sumOfApprovedClaims = 0;
    private Double sumOfOpenOppsCommission = 0;
    private Double sumOfClosedOppsCommission = 0;
    private Double sumOfPendingClaimsCommission = 0;
    private Double sumOfApprovedClaimsCommission = 0;
    private Double cscAttainment = 0;
    
    public String comments {get; set;}  
    public String claimStatus {get; set;} 
    public Callidus_Claim__c claim {get; set;} 
    public List<Callidus_Claim__c> filedClaimList {get; set;} 
    public List<Callidus_Claim_History__c> claimHistoriesList {get; set;}
    public List<ClaimHistories> claimHistoryList {get; set;}//WrapperClass
    private Callidus_Plan_Assignable__c[] planAssignableList {get; set;}
    public Cald_OpportunityExtensionVF(ApexPages.StandardController myController)
    {
        try
        {
            opportunity[0] = (Opportunity)myController.getRecord();
            oppId = opportunity[0].id;
            
            opportunityList = [select Name, Amount, AccountId, Opportunity.Account.Name, ExpectedRevenue, Type, Description, OwnerId, Opportunity.Owner.Name, CloseDate, LeadSource, Opportunity.Campaign.Name, MainCompetitors__c, OrderNumber__c, CurrentGenerators__c, TrackingNumber__c from Opportunity where id = :oppId];
            ytdAttainment = String.valueOf(0.0);
            displayDraftFlag = nonPendingApprovalFlag = ytdAttainmentFlag = fileClaimButtonFlag = true;
            
            Schema.Sobjecttype s = Schema.getGlobalDescribe().get('Sales_Contract__c');
            if(s == null)
                lookUpButFlag = false;
            else
                lookUpButFlag = true;

            standaloneFlag = planAssociatedFlag = renderNotesAndAttach = displayReadOnlyFlag = pendingApprovalFlag = displayAssignedToFlag = showClaimHistories = false;//initially hide Claim History
            
            filingDateClaim = new Callidus_Claim__c();
            
            existingCSCList = [select id, Attainment__c, Participant__c, Amount__c, Commission__c, FYear__c, Claim_Status__c from Callidus_Claim_Status_Credit__c where Participant__c = :UserInfo.getUserId() and FYear__c = :opportunityList[0].CloseDate.Year() and Claim_Status__c != 'Approved Claims'];
       
            //Add ownerid to the where clause to get only the Current Users participant. 
            participantOppList = [select id, StageName, Amount from Opportunity where OwnerId = :UserInfo.getUserId() and Opportunity.FiscalYear = :opportunityList[0].CloseDate.year() limit 1000];
            for(Opportunity o : participantOppList)
            {
                if(o.StageName == 'Closed Won')
                    sumOfClosedOpp += o.Amount;
                else
                    sumOfOpenOpp += o.Amount;
            }
            
            String currentYear = String.valueOf(opportunityList[0].CloseDate.year());
            Date startDate = Date.valueOf(currentYear+'-01-01 00:00:00');           
            Date endDate = Date.valueOf(currentYear+'-12-31 23:59:00');
            String[] claimStatusArray = new String[]{'Pending Approval', 'Approved'};           
            Callidus_Claim__c[] pendingClaimList = [select Adjusted_Credit__c, Adjusted_Commission__c, Claim_Status__c from Callidus_Claim__c where OwnerId = :UserInfo.getUserId() and Filing_Date__c >= :startDate and Filing_Date__c <= :endDate and Claim_Status__c in :claimStatusArray];
            for(Callidus_Claim__c c : pendingClaimList)
            {
                if(c.Claim_Status__c == 'Pending Approval')
                {
                    sumOfPendingClaims += c.Adjusted_Credit__c;
                    sumOfPendingClaimsCommission += c.Adjusted_Commission__c;  
                }
                else
                {
                    sumOfApprovedClaims += c.Adjusted_Credit__c;
                    sumOfApprovedClaimsCommission += c.Adjusted_Commission__c;
                }
            }
            
            claimObj();
        }
        catch(Exception e)
        {
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
        }
    }

    public List<Opportunity> getOpportunityDetails()
    {
        return opportunityList;
    }
    
    private void estimateClaimedAmount()
    {
        if(commissionRate != null)
            commissionAmount = String.valueOf((Double.valueOf(commissionRate) * Double.valueOf(claimedCredit)) / 100);
    }
    
    public PageReference estimate()
    {
        estimateClaimedAmount();
        return null;
    }
    
    public PageReference lookupPlanDocument()
    {
        return null;
    }

    public PageReference withdraw()
    {
        try
        {
            if(claim.Claim_Status__c != 'Approved')
            {
                claim.Claim_Status__c = 'Withdrawn';
                claim.Assigned_To__c = null;
                update claim;
                addToAuditAndHistory('Withdrawn');
                displayReadOnlyFlag = pendingApprovalFlag = withdrawButFlag = false;
                displayDraftFlag = nonPendingApprovalFlag = fileClaimButtonFlag = true;
                if(planId != null)
                    estimateButtonFlag = true;
                claimHistoriesList = null;
                claimHistoryList = null;
                showClaimHistories = !showClaimHistories;
                claimStatus = 'Withdrawn';
                claimedCredit = String.valueOf(opportunityList[0].Amount);
                estimateClaimedAmount();
                filingDateClaim.Filing_Date__c = opportunityList[0].CloseDate; 
                
                if(planAssignableList.size() == 0)
                {
                    comments = '';
                    commissionAmount = '';
                    commissionRate = '';
                    standaloneFlag = true;
                    planAssociatedFlag = false;
                }
                else
                {
                    standaloneFlag = false;
                    planAssociatedFlag = true;
                }
            }
        }
        catch(Exception e)
        {
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
        }
        return null;
    }

    private void dRate()
    {
        if(commissionAmount != null && claimedCredit != null)
        {
            commissionRate = String.valueOf((Double.valueOf(commissionAmount)/Double.valueOf(claimedCredit))*100);
            Decimal d = Decimal.valueOf(commissionRate);
            d = d.divide(1, 2);
            commissionRate = String.valueof(d);
        }
    }
    
    public PageReference deriveRate()
    {
        dRate();
        return null;
    }    

    public PageReference fileClaim()
    {
        try
        {
            dRate();
                
            List<User> managerList = [select ManagerId from User where id = :UserInfo.getUserId()];
            ID managerId = null;
            if(managerList.size() > 0 && managerList[0].managerId != null)
            {
                managerId = managerList[0].managerId;
                displayAssignedToFlag = true;
            }
            
            claim = new Callidus_Claim__c(Plan__c = planId, Participant__c = UserInfo.getUserId(), Payout_Type__c = payoutType, Attainment__c = Double.valueOf(ytdAttainment), Commission_Rate__c = Double.valueOF(commissionRate), Commission_Amount__c = Double.valueOf(commissionAmount), Credit__c = Double.valueOf(claimedCredit), Adjusted_Commission__c = Double.valueOf(commissionAmount), Adjusted_Credit__c = Double.valueOf(claimedCredit), Opportunity__c = opportunity[0].id, Comments__c = comments, Claim_Status__c = 'Pending Approval', Temporary_Status__c = '', Filing_Date__c = filingDateClaim.Filing_Date__c, Assigned_To__c = managerId);
            insert claim;
            addToAuditAndHistory('Filed');
            
            Callidus_Configuration__c[] configList = [select IsFinalApprover__c, Response_Window__c, Approver__c, Approver_Level__c from Callidus_Configuration__c];
            if(configList.size() > 0)
            {
                User[] user = [Select Id, managerId from User us where us.Id = :UserInfo.getUserId()];
                Double d = 0;
                for(Callidus_Configuration__c c: configList)
                {
                    d = c.Response_Window__c;
                    if(c.IsFinalApprover__c == 'No' && user.size() > 0 && user[0].managerId != null)
                    {
                        if(claim.Level1_Approver__c == null)
                        {
                            claim.Level1_Approver__c = user[0].managerId;
                            claim.Level1_Approver_DueDate__c = Date.today() + d.round();
                        }
                        else if(claim.Level2_Approver__c == null)
                        {
                            claim.Level2_Approver__c = user[0].managerId;
                            claim.Level2_Approver_DueDate__c = Date.today() + d.round();
                        }
                        else if(claim.Level3_Approver__c == null)
                        {
                            claim.Level3_Approver__c = user[0].managerId;
                            claim.Level3_Approver_DueDate__c = Date.today() + d.round();
                        }
                        else if(claim.Level4_Approver__c == null)
                        {
                            claim.Level4_Approver__c = user[0].managerId;
                            claim.Level4_Approver_DueDate__c = Date.today() + d.round();
                        }
                        else if(claim.Level5_Approver__c == null)
                        {
                            claim.Level5_Approver__c = user[0].managerId;
                            claim.Level5_Approver_DueDate__c = Date.today() + d.round();
                        }
                        else if(claim.Level6_Approver__c == null)
                        {
                            claim.Level6_Approver__c = user[0].managerId;
                            claim.Level6_Approver_DueDate__c = Date.today() + d.round();
                        }
                        user = [Select Id, managerId from User us where us.Id= :user[0].managerId];
                    }
                    if(c.Approver_Level__c != 'select' && c.IsFinalApprover__c == 'Yes' && user.size() > 0 && user[0].managerId != null)
                    {
                        if(claim.Final_Approver__c == null)
                        {
                            claim.Final_Approver__c = c.Approver_Level__c;
                            claim.Final_Approver_DueDate__c = Date.today() + d.round();
                        }
                        
                    }
                }
            }
            else
            {
                ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, 'Approvers are not Configured'));
                return null;
            }
            update claim;

                        
            Approval.ProcessSubmitRequest request =new Approval.ProcessSubmitRequest();
            request.setObjectId(claim.Id);
            Approval.ProcessResult result = Approval.process(request);
          
            
            String st = getClaimHistories();
            displayDraftFlag = nonPendingApprovalFlag = estimateButtonFlag = fileClaimButtonFlag = false;
            renderNotesAndAttach = displayReadOnlyFlag = withdrawButFlag = true;
            claimStatus = claim.Claim_Status__c;
            pendingApprovalFlag = displayAssignedToFlag = true;
            
            if(existingCSCList != null && existingCSCList.size() > 0)
            {
                for(Callidus_Claim_Status_Credit__c csc : existingCSCList)
                {
                    if(csc.Claim_Status__c == 'All Open Opportunities')
                    {
                        csc.Amount__c = sumOfOpenOpp;
                        csc.Commission__c = (getCommissionRate(sumOfOpenOpp) * sumOfOpenOpp)/100;
                    }
                    else if(csc.Claim_Status__c == 'Closed Won Opportunities')
                    {
                        Double val = (sumOfClosedOpp - (sumOfPendingClaims + claim.Adjusted_Credit__c + sumOfApprovedClaims));
                        csc.Amount__c = val;
                        csc.Commission__c = (getCommissionRate(val) * val)/100;
                    }
                    else if(csc.Claim_Status__c == 'Pending Claims')
                    {
                        csc.Amount__c = sumOfPendingClaims + claim.Adjusted_Credit__c;
                        csc.Commission__c = sumOfPendingClaimsCommission + claim.Adjusted_Commission__c;
                    }
                    csc.Attainment__c = (csc.Amount__c.doubleValue() * 100) /planQuota;
                }
                update existingCSCList;
            }
            else
            {
                List<Callidus_Claim_Status_Credit__c> newCSCList = new List<Callidus_Claim_Status_Credit__c>();
                Callidus_Claim_Status_Credit__c newObj = new Callidus_Claim_Status_Credit__c(Participant__c = UserInfo.getUserId(), FYear__c = opportunityList[0].CloseDate.year(), Claim_Status__c = 'All Open Opportunities', Amount__c = sumOfOpenOpp, Commission__c = ((getCommissionRate(sumOfOpenOpp) * sumOfOpenOpp)/100), Attainment__c = ((sumOfOpenOpp * 100) /planQuota));
                newCSCList.add(newObj);

                Double tempVal = (sumOfClosedOpp - (sumOfPendingClaims + claim.Adjusted_Credit__c + sumOfApprovedClaims));
                newObj =  new Callidus_Claim_Status_Credit__c(Participant__c = UserInfo.getUserId(), FYear__c = opportunityList[0].CloseDate.year(), Claim_Status__c = 'Closed Won Opportunities', Amount__c = (sumOfClosedOpp - claim.Adjusted_Credit__c), Commission__c = ((getCommissionRate(tempVal) * tempVal)/100), Attainment__c = ((tempVal * 100) /planQuota));
                newCSCList.add(newObj);
                
                tempVal = (sumOfPendingClaims + claim.Adjusted_Credit__c);
                newObj =  new Callidus_Claim_Status_Credit__c(Participant__c = UserInfo.getUserId(), FYear__c = opportunityList[0].CloseDate.year(), Claim_Status__c = 'Pending Claims', Amount__c = tempVal, Commission__c = ((getCommissionRate(tempVal) * tempVal)/100), Attainment__c = ((tempVal * 100) /planQuota));
                newCSCList.add(newObj);
                newObj =  new Callidus_Claim_Status_Credit__c(Participant__c = UserInfo.getUserId(), FYear__c = opportunityList[0].CloseDate.year(), Claim_Status__c = 'Approved Claims', Amount__c = 0, Commission__c = 0);
                newCSCList.add(newObj);
                insert newCSCList;
            }
            
        }
        catch(Exception e)
        {
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
        }        
        return null;
    }
    
    private Double getCommissionRate(Double creditAmount)
    {
        if(currentRateList[0].Rate_Type__c == 'Attainment')
        {
                Double cRate = (creditAmount * 100) / planQuota;
                
                for(Callidus_Rate__c r: currentRateList)
                {
                    if(cRate >= r.Min_Attainment__c && cRate <= r.Max_Attainment__c)
                        return r.Rate__c;
                }
        }//end ofif(currentRateList[0].Rate_Type__c == 'Attainment')
        else
        {
            for(Callidus_Rate__c r: currentRateList)
            {
                if(creditAmount >= r.Min_Credit__c && creditAmount <= r.Max_Credit__c)
                    return r.Rate__c;
            }
        }
        return 0;
    }     
    
    public Callidus_Claim__c getClaim()
    {
        return claim;
    }   
    
    private void addToAuditAndHistory(String cStatus)
    {
        Callidus_Claim_Audit__c ca = new Callidus_Claim_Audit__c(Claim__c = claim.id, claim_status__c = cStatus, Submission_Date__c = Date.today(), Comments__c = comments);
        insert ca;
        Callidus_Claim_History__c ch = new Callidus_Claim_History__c(Claim__c = claim.id, Comments__c = comments, Action_Date__c = Date.today(), Claim_Status__c = cStatus, User__c = UserInfo.getUserId());
        insert ch;
    }
    
    private void claimObj()
    {
        try
        {
            //Check if Plan is assigned to the Participant.
            planAssignableList = [select Id, Plan_Role__c, Plan__c, Quota__c, Plan__r.OTE__c from Callidus_Plan_Assignable__c p where p.Effective_Start_Date__c <= :opportunityList[0].CloseDate and p.Effective_End_Date__c >= :opportunityList[0].CloseDate and p.Participant__c = :UserInfo.getUserId() order by createddate desc limit 1];
            Double ytdAtt = 0;
                
            try
            {
                if(planAssignableList.size() > 0)
                {
                    //Get the Plan and check if it Close Date falls in b/w Plan Period
                    planId = planAssignableList[0].Plan__c;
                    planQuota = planAssignableList[0].Quota__c;
                    planOTE = planAssignableList[0].Plan__r.OTE__c;
                }
                Callidus_Plan_Participant__c[] pList = [select YTD_Attainment__c from Callidus_Plan_Participant__c where Plan__c = :planId and Participant__c = :UserInfo.getUserId()];
                
                for(Callidus_Plan_Participant__c p :pList)
                {
                    if(ytdAtt < p.YTD_Attainment__c)
                        ytdAtt = p.YTD_Attainment__c;
                }
            }
            catch(Exception e)
            {
                ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
            }
            estimateButtonFlag = fileClaimButtonFlag = true;
            withdrawButFlag = false; 
            if(claimedCredit == null)
                claimedCredit = String.valueOf(opportunityList[0].Amount);

            claimStatus = 'Draft';
            
            if(filingDateClaim.Filing_Date__c == null)
                filingDateClaim.Filing_Date__c = opportunityList[0].CloseDate; 

            if(planAssignableList.size() > 0)
            {
                planAssociatedFlag = true;
                //Work on this later to find the claims made till now on a particular Plan which are Approved
                Callidus_Claim__c[] claimsList = [select Credit__c, Attainment__c from Callidus_Claim__c where Plan__c = :planId and Participant__c = :UserInfo.getUserId() and Claim_Status__c = 'Approved'];
                Double approvedClaimedCredit = 0;
                Double totalCredit = 0;//sum of (approvedClaimedCredit + current opportunity amount)
                for(Callidus_Claim__c c: claimsList)
                {
                    approvedClaimedCredit += c.Credit__c;   
                }
                    
                currentRateList = [select Rate_Type__c, Min_Attainment__c, Max_Attainment__c, Min_Credit__c, Max_Credit__c, Rate__c from Callidus_Rate__c where Plan__c = :planId];
                if(currentRateList.size() > 0)
                    payoutType = currentRateList[0].Rate_Type__c;

                totalCredit = approvedClaimedCredit + opportunityList[0].Amount;
                    
                if(currentRateList[0].Rate_Type__c == 'Attainment')
                {
                        ytdAttainment = String.valueOf(ytdAtt);
                        Double cRate = (totalCredit * 100)/planQuota;
                        
                        for(Callidus_Rate__c r: currentRateList)
                        {
                            if(cRate >= r.Min_Attainment__c && cRate <= r.Max_Attainment__c)
                            {
                                commissionRate = String.valueOf(r.Rate__c);
                                break;
                            }
                        }
                }//end ofif(currentRateList[0].Rate_Type__c == 'Attainment')
                else
                {
                    ytdAttainment = String.valueOf(approvedClaimedCredit);
                    for(Callidus_Rate__c r: currentRateList)
                    {
                        if(totalCredit >= r.Min_Credit__c && totalCredit <= r.Max_Credit__c)
                        {
                            commissionRate = String.valueOf(r.Rate__c);
                            break;
                        }
                    }
                }
               
                estimateClaimedAmount(); 
            }//end of if(planAssignableList.size() > 0)
            else
            {
                estimateButtonFlag = false;
                standaloneFlag = true;
                payoutType = 'Credit';
                ytdAttainment = String.valueOf(0);
            }
        }
        catch(Exception e)
        {
            ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.info, e.getMessage()));
        }
    }//end of claimObj()
    
    private String getClaimHistories()
    {
        claimHistoriesList = [select Comments__c, Claim_Status__c, User__c, User__r.Name, Action_Date__c from Callidus_Claim_History__c where Claim__c = :claim.id order by createddate desc];
        if(claimHistoriesList.size() > 0)
        {
            claimHistoryList = new List<ClaimHistories>();
            showClaimHistories = !showClaimHistories;
        }
        else 
            claimHistoryList = null;
            
        for(Callidus_Claim_History__c ch : claimHistoriesList)
        {
            claimHistoryList.add(new ClaimHistories(ch.Comments__c, ch.Claim_Status__c, ch.User__r.Name, ch.User__c, ch.Action_Date__c));
        }
        return 'success';
    }//end of getClaimHistories()
    
    public class ClaimHistories
    {
        public String Comments {get; set;}
        public String claimStatus {get; set;}
        public String userName {get; set;}
        public ID userId {get; set;}
        public String actionDate {get; set;}
        public ClaimHistories(String com, String status, String uName, Id uId, Date d)
        {
            Comments = com; 
            claimStatus = status;
            userName = uName;
            userId = uId;
            actionDate = d.Month()+'/'+d.Day()+'/'+d.Year();
        }
    }
    
    public List<ClaimHistories> getClaimHistorys() {
        return claimHistoryList;
    }
    
    public String changeCC()
    {
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;      
        displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag = displayAssignedToFlag;
        return 'success';      
    }

    static testMethod void testCald_OpportunityExtensionVF()
    {
        PageReference pg = Page.Cald_Opportunity_Claim_Detail;
        Test.setCurrentPage(pg);
        Opportunity o = [select Name, Amount, AccountId, Opportunity.Account.Name, ExpectedRevenue, Type, Description, OwnerId, Opportunity.Owner.Name, CloseDate, LeadSource, Opportunity.Campaign.Name, MainCompetitors__c, OrderNumber__c, CurrentGenerators__c, TrackingNumber__c from Opportunity limit 1];
        ApexPages.StandardController mc = new Apexpages.Standardcontroller(o);
        Cald_OpportunityExtensionVF oe = new Cald_OpportunityExtensionVF(mc);
        Test.startTest();
        oe.claimStatus = 'Pending';
        system.assertEquals('Pending', oe.claimStatus);
        oe.ytdAttainment = '0';
        
        system.assertEquals('0', oe.ytdAttainment);
        oe.commissionRate = '1';
        
        system.assertEquals('1', oe.commissionRate);
        
        system.assertEquals(oe.opportunityList, oe.getOpportunityDetails());
        system.assertEquals(null, oe.estimate());
        system.assertEquals(null, oe.fileClaim());
        
        ClaimHistories ch = new ClaimHistories('Test', 'Pending Approval', 'Admin', UserInfo.getUserId(), Date.today());
        system.assertEquals('success', oe.changeCC());
        
        oe.claimHistoryList = new List<ClaimHistories>();
        oe.claimHistoryList.add(ch);
        
        system.assertEquals('Admin', oe.claimHistoryList.get(0).userName);
        
        system.assertEquals('success', oe.getClaimHistories());
        
        system.assertEquals(oe.claimHistoryList, oe.getClaimHistorys());
        system.assertEquals(null, oe.withdraw());
        Test.stopTest();
    }

}